import yagmail
from config.config import *

'''
receivers:收件人列表
subject:邮件主题
content:邮件文本
attachments:附件路径列表
cc:抄送列表
'''


def send(receivers, subject, content, attacmhents=None, cc=None):
    yag = yagmail.SMTP(user=email_sender, password=email_sender_pwd, host=emaiil_smtpsever, port=email_port,
                       smtp_ssl=True)
    yag.send(receivers, subject, content, attacmhents, cc)

# send("894638187@qq.com", "测试", "aaa", [config.PATH_DESKTOP + "\showjavaVersion.bat"], "luck2755@163.com")

# send("1115679859@qq.com", "测试", "aaa")
